//
//  ChatFriendListService.m
//  chatModule
//
//  Created by sy on 2024/11/28.
//  

#import "ChatFriendListService.h"
// #import "userInfoModel.h"
#import "MSUserManager.h"

@implementation ChatFriendListService

- (NSString*)port{
    return @"/app_server/v1/chat/friend_list";
}
- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end

@implementation ChatAddFriendApplyService

- (NSString*)port{
    return @"/app_server/v1/chat/friend_apply_add";
}
- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end

@implementation ChatApplyCheckFriendService

- (NSString*)port{
    return @"/app_server/v1/chat/friend_apply_check";
}
- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end


@implementation ChatFriendInfoService

- (NSString*)port{
    return @"/app_server/v1/chat/update_friend_info";
}
- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end

@implementation ChatDeleteFriendService

- (NSString*)port{
    return @"/app_server/v1/chat/delete_friend";
}
- (NSString*)domain{
    return DHFMAINURL;
}
- (NSDictionary*)requstBody{
    return [self modelForDict];
}
- (void)headers{
    userInfoModel *infomodel = [MSUserManager sharedManager].userModel;
    if (infomodel.token.length>0) {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@"bearer %@",infomodel.token] forHTTPHeaderField:@"Authorization"];
    } else {
        [PPNetworkHelper setValue:[NSString stringWithFormat:@""] forHTTPHeaderField:@""];
    }
}

@end

